using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using MM.Business;
using MM.Entities;

namespace MM
{
    public partial class frmDangXuat : Form
    {
        public static string strConn;

        public frmDangXuat(string sConn)
        {
            InitializeComponent();
            strConn = sConn;

            Common.SetColor(this);
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnDangXuat_Click(object sender, EventArgs e)
        {
            frmDangNhap.objTaiKhoan = null;
            frmDangNhap.objTau = null;
            FormCollection fc = Application.OpenForms;
            if (fc != null && fc.Count > 0)
            {
                for (int i = fc.Count - 1; i >= 0; i--)
                {
                    if (fc[i] != null && fc[i].IsDisposed != true)
                    {
                        fc[i].Dispose();
                    }
                }
            }
        }
    }
}